-
Notifications
You must be signed in to change notification settings - Fork 351
feat: customizable fill handle config #1068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: customizable fill handle config #1068
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces customizable fill handle configuration, allowing users to control the shape, size, position, and outline of the fill handle (the drag square in the bottom-right corner of a cell selection). The default behavior is maintained with a rectangular handle offset on the corner with an outline.
- Changes the
fillHandle
prop from a boolean to accept either a boolean or a partial configuration object - Adds support for circular and square fill handle shapes with customizable size and positioning
- Updates rendering logic to draw the fill handle with configurable outline and positioning
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
packages/core/src/internal/data-grid/data-grid-types.ts | Defines new FillHandleConfig type and DEFAULT_FILL_HANDLE constant |
packages/core/src/internal/data-grid/render/draw-grid-arg.ts | Updates DrawGridArg interface to use FillHandle type instead of boolean |
packages/core/src/internal/data-grid/render/data-grid.render.rings.ts | Implements new fill handle rendering logic with shape, size, and outline support |
packages/core/src/internal/data-grid/render/data-grid-render.ts | Updates fill handle visibility check to work with new type |
packages/core/src/internal/data-grid/data-grid.tsx | Updates mouse position detection logic for customizable fill handle dimensions |
packages/core/src/docs/examples/fill-handle.stories.tsx | Updates example to demonstrate new configuration options |
packages/core/API.md | Updates documentation to reflect new fillHandle configuration options |
packages/core/src/internal/data-grid/render/data-grid.render.rings.ts
Outdated
Show resolved
Hide resolved
packages/core/src/internal/data-grid/render/data-grid.render.rings.ts
Outdated
Show resolved
Hide resolved
Addressed copilot comments; fixing merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 I added a couple of minor tweaks: added allowedFillDirections
and onFillPattern
to API.md, changed the default fill handle to the current state (4px, without outline in the right corner and extended the storybook case a bit.
Allows fill handle to be customizable. Default is rectangle offset on the corner with outline.